From: Richard M. Stallman Date: Tue, 3 Jul 2007 02:54:42 +0000 (+0000) Subject: (command-line): Set buffer-offer-save in *scratch* and enable auto-save in it. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~18102 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=229b5d94f68e68fee3ec345277d3e08905752ef3;p=emacs.git (command-line): Set buffer-offer-save in *scratch* and enable auto-save in it. --- diff --git a/lisp/startup.el b/lisp/startup.el index 1943367dfc8..4e43b39bfd4 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1055,7 +1055,10 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (if (get-buffer "*scratch*") (with-current-buffer "*scratch*" (if (eq major-mode 'fundamental-mode) - (funcall initial-major-mode)))) + (funcall initial-major-mode)) + ;; Don't lose text that users type in *scratch*. + (setq buffer-offer-save t) + (auto-save-mode 1))) ;; Load library for our terminal type. ;; User init file can set term-file-prefix to nil to prevent this.